<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/add.css">
        <script src="${pageContext.request.contextPath}/js/add_user.js"></script>
        <script>
            if ('${success_add}' == 1) {
                alert("添加成功!!!");
            }
            if ('${success_modify}' == 1) {
                alert("修改成功!!!");
            }
        </script>
        <div class="table">
            <form method="post" id="add_user">
                <h1>添加用户</h1>
                <table id="table">
                    <tr>
                        <th>姓名:</th>
                        <td><input type="text" name="doc_name" id="doc_name" value="${user.doc_name}" autocomplete="off"></td>
                        <th>性别:</th>
                        <td>
                            <span>男 </span><input type="radio" name="doc_sex" value="男" class="choice"
                                style="cursor: pointer;" checked>

                            <span>女 </span><input type="radio" name="doc_sex" value="女" class="choice"
                                style="cursor: pointer;">
                        </td>
                    </tr>
                    <tr>
                        <th>年龄:</th>
                        <td><input type="text" name="doc_age" id="doc_age" value="${user.doc_age}" style="width: 50px;"
                                onkeyup="value=value.replace(/[^\d]/g,'');" autocomplete="off"><span>岁</span></td>
                        <th>职称:</th>
                        <td>
                            <select name="doc_title">
                                <option value="主任医师">主任医师</option>
                                <option value="副主任医师">副主任医师</option>
                                <option value="主治医师">主治医师</option>
                                <option value="住院医师">住院医师</option>
                                <option value="实习生">实习生</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>科室:</th>
                        <td><input type="text" name="doc_department" id="doc_department" value="${user.doc_department}" autocomplete="off">
                        </td>
                        <th>联系方式:</th>
                        <td><input type="text" name="doc_tel" id="doc_tel" value="${user.doc_tel}"
                                onkeyup="value=value.replace(/[^\d]/g,'');" autocomplete="off"></td>
                    </tr>
                </table>
                <div class="button">
                    <input type="button" value="提交" onclick="submitPage('${user.id}',this.form)">
                    <c:if test="${user==null}">
                        <input type="reset" value="重置">
                    </c:if>
                    <c:if test="${user!=null}">
                        <input type="button" name="" value="返回" onclick="javascript:window.location='userJdc.action'">
                    </c:if>
                </div>
                <div class="tips">
                    <span id="error">${error}</span>
                </div>
            </form>
        </div>